
package gov.chinatax.ctcps.generator.form;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for czdzDzb.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="czdzDzbForm"
 */
public class YhdzDzbForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _bh = null;
   private java.lang.String _dwbh = null;
   private java.lang.String _nd = null;
   private java.math.BigDecimal _yf = null;
   private java.lang.String _sbztDm = null;
   private java.lang.String _hzztDm = null;
   private java.lang.String _hdztDm = null;
   private java.lang.String _sx = null;
   private java.lang.String _bank_type = null;
   private java.lang.String _bank_name = null;
   private java.lang.String _send_state = null;
   private java.lang.String _hzsj_bz = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;

   /**
    * Standard constructor.
    */
   public YhdzDzbForm() {
   }

   /**
    * Returns the bh
    *
    * @return the bh
    */
   public java.lang.String getBh() {
      return _bh;
   }

   /**
    * Sets the bh
    *
    * @param bh the new bh value
    */
   public void setBh(java.lang.String bh) {
      _bh = bh;
   }
   /**
    * Returns the dwbh
    *
    * @return the dwbh
    */
   public java.lang.String getDwbh() {
      return _dwbh;
   }

   /**
    * Sets the dwbh
    *
    * @param dwbh the new dwbh value
    */
   public void setDwbh(java.lang.String dwbh) {
      _dwbh = dwbh;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the yf
    *
    * @return the yf
    */
   public java.math.BigDecimal getYf() {
      return _yf;
   }

   /**
    * Sets the yf
    *
    * @param yf the new yf value
    */
   public void setYf(java.math.BigDecimal yf) {
      _yf = yf;
   }
   /**
    * Returns the sbztDm
    *
    * @return the sbztDm
    */
   public java.lang.String getSbztDm() {
      return _sbztDm;
   }

   /**
    * Sets the sbztDm
    *
    * @param sbztDm the new sbztDm value
    */
   public void setSbztDm(java.lang.String sbztDm) {
      _sbztDm = sbztDm;
   }
   /**
    * Returns the hzztDm
    *
    * @return the hzztDm
    */
   public java.lang.String getHzztDm() {
      return _hzztDm;
   }

   /**
    * Sets the hzztDm
    *
    * @param hzztDm the new hzztDm value
    */
   public void setHzztDm(java.lang.String hzztDm) {
      _hzztDm = hzztDm;
   }
   /**
    * Returns the hdztDm
    *
    * @return the hdztDm
    */
   public java.lang.String getHdztDm() {
      return _hdztDm;
   }

   /**
    * Sets the hdztDm
    *
    * @param hdztDm the new hdztDm value
    */
   public void setHdztDm(java.lang.String hdztDm) {
      _hdztDm = hdztDm;
   }
   /**
    * Returns the sx
    *
    * @return the sx
    */
   public java.lang.String getSx() {
      return _sx;
   }

   /**
    * Sets the sx
    *
    * @param sx the new sx value
    */
   public void setSx(java.lang.String sx) {
      _sx = sx;
   }
   

   public java.lang.String getBank_type() {
   	return _bank_type;
   }

   public void setBank_type(java.lang.String _bank_type) {
   	this._bank_type = _bank_type;
   }

   public java.lang.String getBank_name() {
   	return _bank_name;
   }

   public void setBank_name(java.lang.String _bank_name) {
   	this._bank_name = _bank_name;
   }

   public java.lang.String getSend_state() {
   	return _send_state;
   }

   public void setSend_state(java.lang.String _send_state) {
   	this._send_state = _send_state;
   }

   public java.lang.String getHzsj_bz() {
   	return _hzsj_bz;
   }

   public void setHzsj_bz(java.lang.String _hzsj_bz) {
   	this._hzsj_bz = _hzsj_bz;
   }

   public java.lang.String getZt1() {
   	return _zt1;
   }

   public void setZt1(java.lang.String _zt1) {
   	this._zt1 = _zt1;
   }

   public java.lang.String getZt2() {
   	return _zt2;
   }

   public void setZt2(java.lang.String _zt2) {
   	this._zt2 = _zt2;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getBh() == null) {
         errors.add("bh", new ActionError("error.bh.required"));
      }
      if(getDwbh() == null) {
         errors.add("dwbh", new ActionError("error.dwbh.required"));
      }
      if(getNd() == null) {
         errors.add("nd", new ActionError("error.nd.required"));
      }
      if(getYf() == null) {
         errors.add("yf", new ActionError("error.yf.required"));
      }
      if(getSbztDm() == null) {
         errors.add("sbztDm", new ActionError("error.sbztDm.required"));
      }
      if(getHzztDm() == null) {
         errors.add("hzztDm", new ActionError("error.hzztDm.required"));
      }
      if(getHdztDm() == null) {
         errors.add("hdztDm", new ActionError("error.hdztDm.required"));
      }
      // TODO test format/data
      return errors;
   }
}
